package com.xjrsoft.module.customerTwo.EMP.t_heat_meter.controller;

import cn.dev33.satoken.annotation.SaCheckPermission;
import cn.dev33.satoken.annotation.SaMode;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xjrsoft.common.page.PageOutput;
import com.xjrsoft.common.page.ConventPage;
import java.util.List;
import com.xjrsoft.common.result.Response;
import com.xjrsoft.core.tool.utils.BeanUtil;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.dto.THeatMeterDto;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.dto.SaveTHeatMeterFormDataDto;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.vo.THeatMeterVo;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.vo.THeatMeterListVo;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.dto.THeatMeterListDto;
import com.xjrsoft.core.secure.utils.SecureUtil;
import com.xjrsoft.core.tool.utils.FlowableUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.AllArgsConstructor;

import org.springframework.web.bind.annotation.*;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.entity.THeatMeter;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.vo.THeatMeterVo;
import com.xjrsoft.module.customerTwo.EMP.t_heat_meter.service.ITHeatMeterService;

/**
 *  控制器
 *
 * @author dongxinhang
 * @since 2023-08-02
 */
@RestController
@AllArgsConstructor
@RequestMapping("/t_heat_meter")
@Api(value = "热水表原始数据", tags = "热水表原始数据接口")
public class THeatMeterController {


	private final ITHeatMeterService tHeatMeterService;


	/**
	 * 详情 
	 */
	@GetMapping("/{id}")
	@ApiOperation(value = "详情", notes = "传入tHeatMeter")
	@SaCheckPermission(value = {"t_heat_meter:view", "t_heat_meter:modify"}, mode = SaMode.OR)
	public Response<THeatMeterVo> getFormData(@PathVariable String id) {
		// 主表数据
		THeatMeter tHeatMeter = tHeatMeterService.getById(id);
		THeatMeterVo tHeatMeterVo = BeanUtil.copy(tHeatMeter, THeatMeterVo.class);
		return Response.ok(tHeatMeterVo);
	}

}
